from django.contrib.auth.models import Group, Permission
from rest_framework import serializers

class GroupPermissionSerializer(serializers.ModelSerializer):
    class Meta:
        model=Group
        fields="__all__"

#2.permission序列化器
class PermissionSimpleSerializer(serializers.ModelSerializer):
    class Meta:
        model=Permission
        fields=("id","name")
